widget: Update the font at the right place
authorBenjamin Otte <otte@redhat.com>
Sat, 4 Jun 2011 19:13:19 +0000 (21:13 +0200)
committerBenjamin Otte <otte@redhat.com>
Sat, 4 Jun 2011 19:18:09 +0000 (21:18 +0200)
Doing it unconditionally is not useful when the subclasses actually
using them can only ever do it in the style_updated signal. So do it in
the style_updated handler instead.

gtk/gtkwidget.c

index 340dd9ef008fce2194dc1d7a38bb16f504b366fa..95079d9015ac20c47c6033acedb767d96a0ec5cc 100644 (file)
@@ -6495,6 +6495,8 @@ gtk_widget_real_style_updated (GtkWidget *widget)
 {
   GtkWidgetPrivate *priv = widget->priv;
 
+  gtk_widget_update_pango_context (widget);
+
   if (priv->style != NULL &&
       priv->style != gtk_widget_get_default_style ())
     {
@@ -14330,8 +14332,6 @@ style_context_changed (GtkStyleContext *context,
 {
   GtkWidget *widget = user_data;
 
-  gtk_widget_update_pango_context (widget);
-
   if (gtk_widget_get_realized (widget))
     g_signal_emit (widget, widget_signals[STYLE_UPDATED], 0);
   else